# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

set(SOURCES
    common/nx_ip_create.c
    common/nx_ip_delete.c
    common/nx_ip_initialize.c
    common/nx_packet_allocate.c
    common/nx_packet_copy.c
    common/nx_packet_data_adjust.c
    common/nx_packet_data_append.c
    common/nx_packet_data_extract_offset.c
    common/nx_packet_data_retrieve.c
    common/nx_packet_debug_info_get.c
    common/nx_packet_length_get.c
    common/nx_packet_pool_cleanup.c
    common/nx_packet_pool_create.c
    common/nx_packet_pool_delete.c
    common/nx_packet_pool_info_get.c
    common/nx_packet_pool_initialize.c
    common/nx_packet_pool_low_watermark_set.c
    common/nx_packet_release.c
    common/nx_packet_transmit_release.c
    common/nx_system_initialize.c
    common/nx_tcp_client_socket_bind.c
    common/nx_tcp_client_socket_connect.c
    common/nx_tcp_client_socket_unbind.c
    common/nx_tcp_enable.c
    common/nx_tcp_free_port_find.c
    common/nx_tcp_initialize.c
    common/nx_tcp_socket_block_cleanup.c
    common/nx_tcp_socket_create.c
    common/nx_tcp_socket_delete.c
    common/nx_tcp_socket_disconnect.c
    common/nx_tcp_socket_establish_notify.c
    common/nx_tcp_socket_receive.c
    common/nx_tcp_socket_receive_notify.c
    common/nx_tcp_socket_send.c
    common/nx_tcp_socket_state_wait.c
    common/nx_udp_enable.c
    common/nx_udp_free_port_find.c
    common/nx_udp_socket_bind.c
    common/nx_udp_socket_create.c
    common/nx_udp_socket_delete.c
    common/nx_udp_socket_receive.c
    common/nx_udp_socket_receive_notify.c
    common/nx_udp_socket_send.c
    common/nx_udp_socket_unbind.c
    common/nx_utility.c
    common/nxde_tcp_client_socket_connect.c
    common/nxde_tcp_socket_peer_info_get.c
    common/nxde_udp_socket_send.c
    common/nxd_tcp_client_socket_connect.c
    common/nxd_udp_socket_send.c
    common/nxe_ip_create.c
    common/nxe_ip_delete.c
    common/nxe_packet_allocate.c
    common/nxe_packet_copy.c
    common/nxe_packet_data_append.c
    common/nxe_packet_data_extract_offset.c
    common/nxe_packet_data_retrieve.c
    common/nxe_packet_length_get.c
    common/nxe_packet_pool_create.c
    common/nxe_packet_pool_delete.c
    common/nxe_packet_pool_info_get.c
    common/nxe_packet_pool_low_watermark_set.c
    common/nxe_packet_release.c
    common/nxe_packet_transmit_release.c
    common/nxe_tcp_client_socket_bind.c
    common/nxe_tcp_client_socket_connect.c
    common/nxe_tcp_client_socket_unbind.c
    common/nxe_tcp_enable.c
    common/nxe_tcp_socket_create.c
    common/nxe_tcp_socket_delete.c
    common/nxe_tcp_socket_disconnect.c
    common/nxe_tcp_socket_establish_notify.c
    common/nxe_tcp_socket_receive.c
    common/nxe_tcp_socket_receive_notify.c
    common/nxe_tcp_socket_send.c
    common/nxe_tcp_socket_state_wait.c
    common/nxe_udp_enable.c
    common/nxe_udp_socket_bind.c
    common/nxe_udp_socket_create.c
    common/nxe_udp_socket_delete.c
    common/nxe_udp_socket_receive.c
    common/nxe_udp_socket_receive_notify.c
    common/nxe_udp_socket_send.c
    common/nxe_udp_socket_unbind.c

    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_3des.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_aes.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_cbc.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ccm.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ctr.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_des.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_dh.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_drbg.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ecdh.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ecdsa.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ecjpake.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec_secp192r1_fixed_points.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec_secp224r1_fixed_points.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec_secp256r1_fixed_points.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec_secp384r1_fixed_points.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_ec_secp521r1_fixed_points.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_gcm.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_generic_ciphersuites.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hkdf.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hmac.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hmac_md5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hmac_sha1.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hmac_sha2.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_hmac_sha5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_huge_number.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_huge_number_extended.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_initialize.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_md5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_methods.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_3des.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_aes.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_des.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_drbg.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_ecdh.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_ecdsa.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_hmac_md5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_hmac_sha.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_md5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_pkcs1.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_prf.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_rsa.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_method_self_test_sha.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_module_start.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_null_cipher.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_phash.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_pkcs1_v1.5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_rsa.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_sha1.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_sha2.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_sha5.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_tls_prf_1.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_tls_prf_sha256.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_tls_prf_sha384.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_tls_prf_sha512.c
    ${CORE_LIB_DIR}/netxduo/crypto_libraries/src/nx_crypto_xcbc_mac.c

    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_client_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_client_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_ecc_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_packet_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_ecc_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_notify_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_stop.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_configure.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_disable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_client_info_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_end.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_receive.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_reset.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_active_certificate_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_client_psk_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_local_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_metadata_size_calculate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_packet_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_remote_certificate_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_remote_certificate_buffer_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_remote_certificate_free_all.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_server_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_server_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_server_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_alert_value_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_certificate_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_client_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_client_verify_disable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_client_verify_enable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_end.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_packet_buffer_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_receive.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_renegotiate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_renegotiate_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_reset.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_server_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_sni_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_sni_extension_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_time_function_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_session_x509_client_verify_configure.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_tls_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_certificate_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_common_name_dns_check.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_crl_revocation_check.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_dns_name_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_extended_key_usage_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_extension_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nxe_secure_x509_key_usage_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_3des.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_aes.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_des.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_hmac_md5.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_hmac_sha.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_md5.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_prf.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_rsa.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_method_self_test_sha.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_rng_self_test.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_crypto_table_self_test.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_allocate_handshake_packet.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_client_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_client_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_client_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_ecc_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_hash_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_packet_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_process_clienthello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_process_handshake_header.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_process_header.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_process_helloverifyrequest.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_process_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_receive_callback.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_retransmit.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_retransmit_queue_flush.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_send_clienthello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_send_handshake_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_send_helloverifyrequest.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_send_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_send_serverhello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_ecc_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_notify_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_stop.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_x509_client_verify_configure.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_server_x509_client_verify_disable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_cache.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_client_info_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_end.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_receive.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_reset.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_session_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_dtls_verify_mac.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_module_hash_compute.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_client_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_crypto_init.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_finished_hash_generate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_generate_keys.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_server_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_session_keys_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_1_3_transcript_hash_save.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_active_certificate_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_allocate_handshake_packet.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_check_protocol_version.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_ciphersuite_lookup.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_client_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_client_psk_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_ecc_generate_keys.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_ecc_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_find_curve_method.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_finished_hash_generate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_generate_keys.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_generate_premaster_secret.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_handshake_hash_init.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_handshake_hash_update.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_handshake_process.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_hash_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_key_material_init.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_local_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_local_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_local_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_map_error_to_alert.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_metadata_size_calculate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_newest_supported_version.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_packet_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_certificate_request.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_certificate_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_changecipherspec.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_clienthello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_clienthello_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_client_key_exchange.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_encrypted_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_finished.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_handshake_header.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_header.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_newsessionticket.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_remote_certificate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_serverhello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_serverhello_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_process_server_key_exchange.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_protocol_version_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_psk_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_psk_binder_generate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_psk_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_psk_identity_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_record_hash_calculate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_record_hash_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_record_hash_update.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_record_payload_decrypt.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_record_payload_encrypt.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_remote_certificate_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_remote_certificate_buffer_allocate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_remote_certificate_free.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_remote_certificate_free_all.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_remote_certificate_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_alert.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_certificate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_certificate_request.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_certificate_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_changecipherspec.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_clienthello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_clienthello_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_client_key_exchange.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_encrypted_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_finished.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_handshake_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_hellorequest.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_newsessionticket.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_record.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_serverhello.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_serverhello_extensions.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_send_server_key_exchange.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_server_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_server_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_server_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_server_handshake.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_alert_value_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_certificate_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_client_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_client_verify_disable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_client_verify_enable.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_create.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_create_ext.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_delete.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_end.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_iv_size_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_keys_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_packet_buffer_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_protocol_version_override.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_receive.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_receive_records.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_renegotiate.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_renegotiate_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_reset.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_send.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_server_callback_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_sni_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_sni_extension_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_start.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_time_function_set.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_session_x509_client_verify_configure.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_shutdown.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_trusted_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_trusted_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_tls_verify_mac.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_chain_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_list_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_list_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_list_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_revocation_list_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_certificate_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_common_name_dns_check.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_crl_revocation_check.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_crl_verify.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_distinguished_name_compare.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_distinguished_name_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_dns_name_initialize.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_ec_private_key_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_expiration_check.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_extended_key_usage_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_extension_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_find_certificate_methods.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_find_curve_method.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_free_certificate_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_key_usage_extension_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_local_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_local_device_certificate_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_oid_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_pkcs1_rsa_private_key_parse.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_pkcs7_decode.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_remote_endpoint_certificate_get.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_store_certificate_add.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_store_certificate_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_store_certificate_remove.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_subject_alt_names_find.c
    ${CORE_LIB_DIR}/netxduo/nx_secure/src/nx_secure_x509_wildcard_compare.c

    ${CORE_LIB_DIR}/netxduo/addons/dns/nxd_dns.c
    ${CORE_LIB_DIR}/netxduo/addons/sntp/nxd_sntp_client.c
    ${CORE_LIB_DIR}/netxduo/addons/mqtt/nxd_mqtt_client.c
    ${CORE_LIB_DIR}/netxduo/addons/cloud/nx_cloud.c
)

set(TARGET netxduo)

add_library(${TARGET} OBJECT)
add_library("azrtos::${TARGET}" ALIAS ${TARGET})

# Append Azure IoT file if the user wants it
if(NXD_ENABLE_AZURE_IOT)
    list(APPEND SOURCES
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot/nx_azure_iot.c
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot/nx_azure_iot_hub_client.c
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot/nx_azure_iot_json_reader.c
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot/nx_azure_iot_json_writer.c
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot/nx_azure_iot_provisioning_client.c
    )

    set(ENV{AZ_SDK_C_NO_SAMPLES} TRUE)
    add_subdirectory(${CORE_LIB_DIR}/netxduo/addons/azure_iot/azure-sdk-for-c azure_sdk_for_c)
    target_link_libraries(${TARGET}
        PUBLIC 
            az::iot::hub
            az::iot::provisioning)
endif()

target_sources(${TARGET}
    PRIVATE
        ${SOURCES}
)

target_compile_definitions(${TARGET}
    PUBLIC 
        NX_INCLUDE_USER_DEFINE_FILE
        NX_AZURE_DISABLE_IOT_SECURITY_MODULE
)

target_include_directories(${TARGET} 
    PUBLIC 
        .
        common
        ${CORE_LIB_DIR}/netxduo/crypto_libraries/inc
        ${CORE_LIB_DIR}/netxduo/nx_secure/inc
        ${CORE_LIB_DIR}/netxduo/nx_secure/ports
        ${CORE_LIB_DIR}/netxduo/addons/azure_iot
        ${CORE_LIB_DIR}/netxduo/addons/cloud
        ${CORE_LIB_DIR}/netxduo/addons/dns
        ${CORE_LIB_DIR}/netxduo/addons/mqtt
        ${CORE_LIB_DIR}/netxduo/addons/sntp
)

target_link_libraries(${TARGET} 
	PUBLIC
        azrtos::threadx
)
